/*
 * @Author: 尔尔
 * @Date: 2024-03-07 09:37:58
 * @LastEditors: 尔尔
 * @LastEditTime: 2024-03-11 09:29:44
 * @FilePath: \ERP\src\api\synthesize\amount\index.js
 * @filePurpose:
 */
import request from "@/utils/request"

// 查询结算列表
export function AccountsList(query) {
	return request({
		url: "/erp/settleAccounts/list",
		method: "get",
		params: query
	})
}

// 查询可以结算的产品列表
export function repairProductListw(query) {
	return request({
		url: "/erp/settleAccounts/repairProductList",
		method: "get",
		params: query
	})
}

// 根据产品id生成结算
export function settleAccounts(data) {
	return request({
		url: "/erp/settleAccounts/settleAccounts",
		method: "post",
		data
	})
}

// 删除结算
export function deleteAccounts(id) {
	return request({
		url: "/erp/settleAccounts/" + id,
		method: "delete"
	})
}

// 获取详情
export function getAccounts(id) {
	return request({
		url: "/erp/settleAccounts/" + id,
		method: "get"
	})
}

// 修改结算
export function updateAccounts(data) {
	return request({
		url: "/erp/settleAccounts",
		method: "put",
		data
	})
}

// 产品结算明细列表

export function DetailList(params) {
	return request({
		url: "/erp/settleAccountsDetail/list",
		method: "get",
		params
	})
}
// 修改明细

export function updateAccountsDetail(data) {
	return request({
		url: "/erp/settleAccountsDetail/batchEdit",
		method: "put",
		data
	})
}

export function getAccountsDetail(id) {
	return request({
		url: "/erp/settleAccountsDetail/" + id,
		method: "get"
	})
}
